package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"log/api/internal/config"
	"log/logrpc/logrpc"
	"log/logrpc/logrpcclient"
)

type ServiceContext struct {
	Config config.Config
	LogRpc logrpc.LogrpcClient
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config: c,
		LogRpc: logrpcclient.NewLogrpc(zrpc.MustNewClient(c.LogRpc)),
	}
}
